export default {
    path: "/cinema",
    name: "cinema",
    component: () => import("@/views/Cinema"),
    children: [
        {
            path: "showingup",
            name: "showingup",
            component: () => import("@/components/ShowingUp")
        },
        {
            path: "upcoming",
            name: "upcoming",
            component: () => import("@/components/UpComing")
        },
        {
            path: "filmDetail/showing/:movieId",
            components: {
                default: () => import("@/components/ShowingUp"),
                filmDetail: () => import("@/views/Cinema/filmDetail")
            },
            /* 配置props后，可以通过 props: ["movieId"] 获取影片的id */
            props: {
                filmDetail: true
            }
        },
        {
            path: "filmDetail/coming/:movieId",
            components: {
                default: () => import("@/components/UpComing"),
                filmDetail: () => import("@/views/Cinema/filmDetail")
            },
            props: {
                filmDetail: true
            }
        },
        {
            path: "/cinema",
            redirect: "showingup"
        }
    ]
}